package com.erp.service.impl;

import com.erp.entity.Customer;
import com.erp.mapper.CustomerMapper;
import com.erp.service.CustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author pyj
 * @since 2020-11-07
 */
@Service
public class CustomerServiceImpl implements CustomerService {

    @Autowired
    private CustomerMapper customerMapper;
    
    
    @Override
    public Customer findCustomerByName(String name) {
        return customerMapper.findCustomerByName(name);
    }

    @Override
    public List<Customer> getAll() {
        return customerMapper.getAll();
    }

    @Override
    public int add(Customer customer) {
        return customerMapper.add(customer);
    }

    @Override
    public int delete(Integer id) {
        return customerMapper.delete(id);
    }

    @Override
    public int update(Customer customer) {
        return customerMapper.update(customer);
    }
}
